package com.itheima.controller;

import com.itheima.pojo.Result;
import com.itheima.service.impl.SetmealServiceImpl;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Log4j2
@RestController
@RequestMapping("/setmeal")
public class SetmealController {
    @Autowired
    private SetmealServiceImpl setmealServiceImpl;

    /**
     * 移动端套餐列表
     */
    @GetMapping("/list")
    public Result checkList(String categoryId, String status){
        return setmealServiceImpl.checkList(categoryId,status);
    }

    /**
     * 移动端套餐？？？菜品详情
     */
    @GetMapping("/dish")
    public Result checkDetail(String id){
        return setmealServiceImpl.checkDetail(id);
    }

}
